<!--description 请假信息添加页面-->
<!--author 李元坝-->
<!--date 20180611-->
<ion-header>

  <ion-navbar>

    <ion-buttons start>
      <button ion-button (click)="cancel()">
        <span color="primary" showWhen="ios">
          {{ 'CANCEL_BUTTON' | translate }}
        </span>
        <ion-icon name="md-close" showWhen="android,windows"></ion-icon>
      </button>
    </ion-buttons>
    <ion-title>{{ 'LEAVE_CREATE_TITLE' | translate }}</ion-title>
    <ion-buttons end>
      <button ion-button (click)="done()" [disabled]="!isReadyToSave" strong>
        <span color="primary" showWhen="ios">
          {{ 'DONE_BUTTON' | translate }}
        </span>
        <ion-icon name="md-checkmark" showWhen="core,android,windows"></ion-icon>
      </button>
    </ion-buttons>
  </ion-navbar>

</ion-header>


<ion-content>
  <form *ngIf="form" [formGroup]="form" >
    <ion-list>
      <ion-item>
        <ion-label color="primary" stacked>{{ 'LEVEL_ID_PLACEHOLDER' | translate }}</ion-label>
        <ion-input type="text" placeholder="{{ 'LEVEL_ID_PLACEHOLDER' | translate }}" [readonly]="true"
                   formControlName="level_id"></ion-input>
      </ion-item>
      <ion-item>
        <ion-label color="primary" stacked>{{ 'LEVEL_TYPE_PLACEHOLDER' | translate }}</ion-label>
        <ion-select formControlName="level_type"    interface="popover" style="height:45px;" placeholder="{{ 'LEVEL_TYPE_PLACEHOLDER' | translate }}" >
          <div *ngFor="let typeData of levelTypeDataArr">
            <ion-option value="{{typeData?.dimision_id}}">{{typeData?.dimision_name}}</ion-option>
          </div>
        </ion-select>
      </ion-item>
      <ion-item>
        <ion-label color="primary" stacked>{{ 'APPLY_MEMO_PLACEHOLDER' | translate }}</ion-label>
        <ion-textarea class="ng-textarea" placeholder="{{ 'APPLY_MEMO_PLACEHOLDER' | translate }}"
                   formControlName="apply_memo" ></ion-textarea>
      </ion-item>
      <ion-item>
        <ion-label color="primary" stacked>{{ 'START_TIME_PLACEHOLDER' | translate }}</ion-label>
        <ion-datetime  displayFormat="YYYY-MM-DD HH:mm:ss"   placeholder="{{ 'START_TIME_PLACEHOLDER' | translate }}"
                    min="{{time_min}}"    formControlName="start_time" ></ion-datetime  >
      </ion-item>
      <ion-item>
        <ion-label color="primary" stacked>{{ 'END_TIME_PLACEHOLDER' | translate }}</ion-label>
        <ion-datetime  displayFormat="YYYY-MM-DD HH:mm:ss"  placeholder="{{ 'END_TIME_PLACEHOLDER' | translate }}"
                       min="{{time_min}}"    formControlName="end_time" ></ion-datetime>
      </ion-item>

    </ion-list>
  </form>
</ion-content>
